﻿using System;
using System.Collections.Generic;
using System.Text;

using Obsidian.Edm;
using Oak.Core.Model;

namespace Oak.Model
{
    public class CoActCategoryInfo : OModel, ITreeNodeInfo
    {

        private LongField categoryId;
        private LongField parentId;
        private StringField categoryName;
        private IntField sortOrder;
        private IntField depth;
        private StringField path;
        private DateTimeField modified;
        private DateTimeField created;
        private BoolField enabled;

        public CoActCategoryInfo()
        {
            base.InitModel("oak", "CoActCategories", new IModelField[]{
                categoryId = new LongField(this, "CategoryId", "catId"),
                parentId = new LongField(this, "ParentId", "parentId"),
                categoryName = new StringField(this, "CategoryName", "catName"),
                sortOrder = new IntField(this, "SortOrder", "sortOrder"),
                depth = new IntField(this, "Depth", "depth"),
                path = new StringField(this, "Path", "path"),
                modified = new DateTimeField(this, "Modified", "modified"),
                created = new DateTimeField(this, "Created", "created"),
                enabled = new BoolField(this, "Enabled", "enabled")
            });
        }

        public LongField CategoryId { get { return categoryId; } }
        public LongField ParentId { get { return parentId; } }
        public StringField CategoryName { get { return categoryName; } }
        public IntField SortOrder { get { return sortOrder; } }
        public IntField Depth { get { return depth; } }
        public StringField Path { get { return path; } }
        public DateTimeField Modified { get { return modified; } }
        public DateTimeField Created { get { return created; } }
        public BoolField Enabled { get { return enabled; } }

        public LongField NodeId { get { return categoryId; } }
        public StringField NodeName { get { return categoryName; } }

    }
}
